/**
 * @USER: Administrator
 * @DATE: 2024/9/28 下午1:23
 * @VERSION: 1.0.0
 */
public class LC1598 {
    public static void main(String[] args) {

    }

    public int minOperations(String[] logs) {
        int result = 0;
        for (String log : logs) {
            switch (log) {
                case "./":
                    continue;
                case "../":
                    if (result>0){
                        result--;
                    }
                    break;
                default:
                    result++;
            }
        }
        return result;
    }

}
